﻿using UnityEngine;
using System.Collections;
using Dict.DataModel;

namespace Dict.Blo
{
    public class DictUnionBlo 
    {
        public static TableUnionConfig GetUnionConfigBlo(int level)
        {
            return DictDataManager.Instance.tableUnionConfigDao.GetById(level);
        }

        public static int GetUnionMaxMember(int level)
        {
            TableUnionConfig union = DictDataManager.Instance.tableUnionConfigDao.GetById(level);
            if (union != null)
                return union.MaxMemberNum;
            return 0;
        }
        public static int GetLevelUpExp(int level)
        {
            TableUnionConfig union = DictDataManager.Instance.tableUnionConfigDao.GetById(level);
            if (union != null)
                return union.UnionExpScore;
            return -1;
        }

        public static int GetLevelUpBadge(int level)
        {
            TableUnionConfig union = DictDataManager.Instance.tableUnionConfigDao.GetById(level);
            if (union != null)
                return union.UnionBadge;
            return -1;
        }

        public static int GetLevelUpCoin(int level)
        {
            TableUnionConfig union = DictDataManager.Instance.tableUnionConfigDao.GetById(level);
            if (union != null)
                return union.UnionCoin;
            return -1;
        }
    }
}


